package com.winit.common.util;


import com.winit.commons.util.SeqGenerate;

public class TableIdUtil {
    private final static String brd_index = "BRD";
    private final static String req_index = "REQ";
    private final static String project_plan_index = "PP";
    private final static String attachment_index = "ATT";

    //生成brd表id
    public synchronized static String createBrdId() {
        return SeqGenerate.createId("yyyyMMddHHmmss", brd_index, "5");
    }

    //生成requirement表id
    public synchronized static String createReqId() {
        return SeqGenerate.createId("yyyyMMddHHmmss", req_index, "5");
    }

    //生成prd表id
    public synchronized static String createProjectPlanId() {
        return SeqGenerate.createId("yyyyMMddHHmmss", project_plan_index, "5");
    }

    //生成附件表id
    public synchronized static String createAttachmentId() {
        return SeqGenerate.createId("yyyyMMddHHmmss", attachment_index, "5");
    }
}
